<h1>!{root.lang.__('module_name')}</h1>
<div id="taracot_pages_list" class="uk-width-1-1">
	<div class="uk-float-left uk-margin-bottom">
		<button class="uk-button uk-button-success uk-float-left" id="btn-add-item"><i class="uk-icon-plus"></i>
			<span class="uk-hidden-small">&nbsp;!{root.lang.__('add')}</span>
		</button>&nbsp;&nbsp;
		<div class="uk-button-group">
			<button class="uk-button" id="btn-select-all" data-uk-tooltip title="!{root.lang.__('select_all')}"><i class="uk-icon-square"></i>
			</button>
			<button class="uk-button" id="btn-select-none" data-uk-tooltip title="!{root.lang.__('select_none')}"><i class="uk-icon-square-o"></i>
			</button>
			<button class="uk-button uk-button-danger" id="btn-delete-selected"><i class="uk-icon-trash-o"></i>
				<span class="uk-hidden-small">&nbsp;!{root.lang.__('delete_selected')}</span>
			</button>
		</div>&nbsp;&nbsp;
		<button class="uk-button" id="btn-folders"><i class="uk-icon-folder-o"></i>
			<span class="uk-hidden-small">&nbsp;!{root.lang.__('folders')}</span>
		</button>&nbsp;
		<button class="uk-button" id="btn-parts"><i class="uk-icon-th"></i>
			<span class="uk-hidden-small">&nbsp;!{root.lang.__('parts')}</span>
		</button>
	</div>
	<div class="uk-form uk-float-right">
		<div class="uk-form-icon"><i class="uk-icon-search"></i>
			<input type="text" class="uk-form-width-medium" placeholder="!{root.lang.__('search_field')}" id="taracot_table_filter">
		</div>
	</div>
	<br>
	<table class="uk-table uk-table-striped uk-table-hover taracot-data-table" id="taracot_table">
		<thead>
			<tr>
				<th class="taracot_table_sortable" rel="taracot_table_sortable_pfolder" style="width:30%">!{root.lang.__('folder_and_filename')}
					<span class="taracot-sort-marker">&nbsp;<i class="uk-icon-sort-asc"></i>
					</span>
				</th>
				<th class="taracot_table_sortable" rel="taracot_table_sortable_ptitle" style="width:60%">!{root.lang.__('ptitle')}</th>
				<th style="width:102px;text-align:center" class="taracot_table_sortable" rel="taracot_table_sortable_lang">!{root.lang.__('lang')}</th>
				<th style="width:122px;text-align:center">!{root.lang.__('actions')}</th>
			</tr>
		</thead>
		<tbody></tbody>
	</table>
	<div class="taracot-loading uk-hidden uk-vertical-align uk-text-center">
		<div class="uk-vertical-align-middle">
			<img src="/modules/user/images/loading_36x36.gif" width="36" height="36" style="width:36px;height:36px" alt="">
		</div>
	</div>
	<div id="taracot_table_pagination"></div>
</div>
<div id="taracot_pages_edit" class="uk-hidden">
	<h2 id="taracot_pages_edit_action"></h2>
	<div class="taracot-margin-medium">!{root.lang.__('taracot_pages_edit_hint')}</div>
	<div class="uk-form uk-form-horizontal">
		<h3 class="taracot-h3-underilne uk-margin-bottom">!{root.lang.__('main_info')}</h3>
		<div class="uk-form-row">
			<label class="uk-form-label" for="ptitle">!{root.lang.__('ptitle')}&nbsp;
				<span class="taracot-field-req">*</span>
			</label>
			<div class="uk-form-controls">
				<input type="text" id="ptitle" class="uk-form-width-large taracot-page-edit-form-control">
				<p class="uk-form-help-block">!{root.lang.__('ptitle_hint')}</p>
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				<ul class="uk-subnav uk-subnav-pill" data-uk-switcher="{connect:'#taracot-pagetype'}">
		    		<li id="taracot-pagetype-regular"><a href="">!{root.lang.__('regular_page')}</a></li>
		    		<li id="taracot-pagetype-root"><a href="">!{root.lang.__('root_page')}</a></li>
				</ul>
			</div>
		</div>
		<div class="uk-form-row">
			<ul id="taracot-pagetype" class="uk-switcher">
	    		<li>
	    			<label class="uk-form-label" for="pfilename">!{root.lang.__('filename')}&nbsp;
						<span class="taracot-field-req">*</span>
					</label>
					<div class="uk-form-controls">
						<input type="text" id="pfilename" class="uk-form-width-small taracot-page-edit-form-control">
						<p class="uk-form-help-block">!{root.lang.__('pfilename_hint')}</p>
					</div>
	    		</li>
	    		<li>
	    			<div class="uk-form-controls">
	    				<p class="uk-form-help-block"><span class="uk-badge uk-badge-warning">!{root.lang.__('hint')}</span>&nbsp;!{root.lang.__('root_page_hint')}</p>
	    			</div>
	    		</li>
			</ul>
		</div>
		<div class="uk-form-row">
			<label class="uk-form-label" for="pfolder">!{root.lang.__('folder')}&nbsp;
				<span class="taracot-field-req">*</span>
			</label>
			<div class="uk-form-controls">
				<input type="text" id="pfolder" class="uk-form-width-medium taracot-page-edit-form-control" value="/">&nbsp;
				<button class="uk-button" id="btn-select-folder">...</button>
				<input type="hidden" id="pfolder_id">
			</div>
		</div>
		<div class="uk-form-row">
			<label class="uk-form-label" for="plang">!{root.lang.__('language')}&nbsp;
				<span class="taracot-field-req">*</span>
			</label>
			<div class="uk-form-controls">
				<select id="plang" class="uk-form-width-small taracot-page-edit-form-control"></select>
			</div>
		</div>
		<div class="uk-form-row" id="plangcopy_row">
			<div class="uk-form-controls">
				<label>
					<input type="checkbox" id="plangcopy">&nbsp;!{root.lang.__('create_copy_for_all_languages')}</label>
			</div>
		</div>
		<div class="uk-form-row">
			<label class="uk-form-label" for="playout">!{root.lang.__('layout')}&nbsp;
				<span class="taracot-field-req">*</span>
			</label>
			<div class="uk-form-controls">
				<select id="playout" class="uk-form-width-medium taracot-page-edit-form-control"></select>
			</div>
		</div>
		<h3 class="taracot-h3-underilne uk-margin-bottom">!{root.lang.__('keywords_and_description')}</h3>
		<div class="uk-form-row">
			<label class="uk-form-label" for="pkeywords">!{root.lang.__('pkeywords')}</label>
			<div class="uk-form-controls">
				<input type="text" id="pkeywords" class="uk-form-width-large taracot-page-edit-form-control">
			</div>
		</div>
		<div class="uk-form-row">
			<label class="uk-form-label" for="pdesc">!{root.lang.__('pdesc')}</label>
			<div class="uk-form-controls">
				<textarea rows="3" id="pdesc" class="uk-form-width-large taracot-page-edit-form-control"></textarea>
			</div>
		</div>
		<h3 class="taracot-h3-underilne uk-margin-bottom">!{root.lang.__('editor')}</h3>
		<div class="uk-form-row">
			<textarea rows="3" id="pcontent" class="uk-form-width-large"></textarea>
		</div>
		<div class="uk-margin-large-top uk-margin-large-bottom">
			<button class="uk-button uk-button-success" id="btn_edit_save">!{root.lang.__('btn_save')}</button>
			<button class="uk-button uk-button-danger" id="btn_edit_cancel">!{root.lang.__('btn_cancel')}</button>
		</div>
	</div>
</div>
<div id="taracot_pages_folders_edit_dlg" class="uk-modal">
	<div class="uk-modal-dialog">
		<a class="uk-modal-close uk-close"></a>
		<h1 id="taracot_pages_folders_edit_h1"></h1>
		<div class="uk-form uk-form-stacked" id="taracot_folders_edit_form">
			<div class="uk-form-row">
				<div class="uk-form-controls">
					<label class="uk-form-label" for="fname">!{root.lang.__('fname')}</label>
					<input type="text" id="fname" class="uk-form-width-medium taracot-folders-edit-control">
				</div>
			</div>
		</div>
		<div class="uk-margin-top">
			<button class="uk-button" id="btn_folders_edit_save">!{root.lang.__('save')}</button>
			<button class="uk-button uk-button-danger uk-modal-close" type="button">!{root.lang.__('cancel')}</button>
		</div>
	</div>
</div>
<div id="taracot_pages_folders_select_dlg" class="uk-modal">
	<div class="uk-modal-dialog">
		<a class="uk-modal-close uk-close"></a>
		<h1>!{root.lang.__('select_folder')}</h1>
		<div id="jstree_folders_select"></div>
		<div class="uk-margin-top">
			<button class="uk-button" id="btn_folders_select">!{root.lang.__('select')}</button>
			<button class="uk-button uk-button-danger uk-modal-close" type="button">!{root.lang.__('cancel')}</button>
		</div>
	</div>
</div>
<div id="taracot_pages_folders" class="uk-hidden">
	<h2>!{root.lang.__('folders')}</h2>
	<div id="taracot_folders_controls" class="uk-margin-bottom">
		<div class="uk-button-group">
			<button class="uk-button uk-button-success taracot-treectl-button" id="btn-tree-new" data-uk-tooltip title="!{root.lang.__('new_tree_node')}"><i class="uk-icon-plus"></i>
			</button>
			<button class="uk-button uk-button taracot-treectl-button" id="btn-tree-edit" data-uk-tooltip title="!{root.lang.__('edit_tree_node')}"><i class="uk-icon-edit"></i>
			</button>
			<button class="uk-button uk-button uk-button-danger taracot-treectl-button" id="btn-tree-delete" data-uk-tooltip title="!{root.lang.__('delete_tree_node')}"><i class="uk-icon-trash-o"></i>
			</button>
		</div>
	</div>
	<div class="uk-margin-top uk-margin-bottom">
		<span class="uk-badge uk-badge-warning">!{root.lang.__('hint')}</span>&nbsp;!{root.lang.__('folders_edit_hint')}</div>
	<div class="uk-grid">
		<div class="uk-width-1-1">
			<div class="uk-panel uk-panel-box">
				<div id="jstree_folders"></div>
				<div id="jstree_error" class="uk-hidden"></div>
				<div id="jstree_loading" class="uk-hidden">
					<img src="/modules/user/images/loading_36x36.gif" width="36" height="36" style="width:36px;height:36px" alt="">&nbsp;!{root.lang.__('loading_tree_data')}</div>
			</div>
		</div>
	</div>
	<button class="uk-button uk-button-success uk-margin-top taracot-tree-save-controls" id="btn-tree-save">!{root.lang.__('save_changes')}</button>
	<button class="uk-button uk-margin-top uk-button-danger taracot-tree-save-controls" id="btn-tree-cancel">!{root.lang.__('cancel')}</button>
	<button class="uk-button uk-margin-top uk-button-danger taracot-tree-save-controls" id="btn-tree-clear">!{root.lang.__('clear')}</button>
</div>
<div id="taracot_lock_dlg" class="uk-modal">
	<div class="uk-modal-dialog">
		<a class="uk-modal-close uk-close"></a>
		<h1>!{root.lang.__('document_locked')}</h1>
		<p>!{root.lang.__('document_locked_hint')}</p>
		<p>!{root.lang.__('document_locked_by')}: <b><span id="document_lock_username"></span></b><br>
		!{root.lang.__('document_locked_on')}: <span id="document_lock_timestamp"></span>
		</p>
		<div class="uk-margin-top">
			<button class="uk-button uk-button-danger" type="button" id="btn_steal_lock">!{root.lang.__('steal_lock')}</button>
			<button class="uk-button uk-modal-close">!{root.lang.__('cancel_edit')}</button>
		</div>
	</div>
</div>
<div id="taracot_outdated_dlg" class="uk-modal">
	<div class="uk-modal-dialog">
		<a class="uk-modal-close uk-close"></a>
		<h1>!{root.lang.__('document_outdated')}</h1>
		<p>!{root.lang.__('document_outdated_hint')}</p>
		<div class="uk-margin-top">
			<button class="uk-button uk-button-danger" type="button" id="btn_force_save_outdated">!{root.lang.__('save_anyway')}</button>
			<button class="uk-button uk-modal-close">!{root.lang.__('cancel_edit')}</button>
		</div>
	</div>
</div>
<div id="taracot_autosave_dlg" class="uk-modal">
	<div class="uk-modal-dialog">
		<a class="uk-modal-close uk-close"></a>
		<h1>!{root.lang.__('document_autosave')}</h1>
		<p>!{root.lang.__('document_autosave_hint')}</p>
		<p><b>!{root.lang.__('unsaved_title')}:</b> <span id="autosave_title"></span></p>
		<div class="uk-margin-top">
			<button class="uk-button uk-button-success" type="button" id="btn_restore_autosave">!{root.lang.__('restore_autosave')}</button>
			<button class="uk-button uk-button-danger" type="button" id="btn_dont_restore_autosave">!{root.lang.__('dont_restore_autosave')}</button>
			<button class="uk-button uk-modal-close">!{root.lang.__('cancel_edit')}</button>
		</div>
	</div>
</div>
<div class="taracot-progress uk-hidden uk-vertical-align uk-text-center">
	<div class="uk-vertical-align-middle">
		<img src="/modules/user/images/loading_36x36.gif" width="36" height="36" style="width:36px;height:36px" alt="">
	</div>
</div>
<script type="text/javascript">
var _lang_vars = {
	ajax_failed: "!{root.lang.__('ajax_failed')}",
	form_err_title: "!{root.lang.__('form_err_title')}",
	form_err_msg: "!{root.lang.__('form_err_msg')}",
	delete_err_msg: "!{root.lang.__('delete_err_msg')}",
	del_confirm: "!{root.lang.__('delete_confirm')}",
	save_success: "!{root.lang.__('save_success')}",
	no_res: "!{root.lang.__('no_results_in_table')}",
	action_edit: "!{root.lang.__('action_edit')}",
	action_add: "!{root.lang.__('action_add')}",
	new_folder: "!{root.lang.__('new_folder')}",
	edit_folder: "!{root.lang.__('edit_folder')}",
	invalid_folder: "!{root.lang.__('invalid_folder')}",
	duplicate_folder: "!{root.lang.__('duplicate_folder')}",
	confirm_delete_tree: "!{root.lang.__('confirm_delete_tree')}",
	confirm_page_edit_cancel: "!{root.lang.__('confirm_page_edit_cancel')}",
	confirm_folders_edit_cancel: "!{root.lang.__('confirm_folders_edit_cancel')}",
	confirm_folders_edit_clean: "!{root.lang.__('confirm_folders_edit_clean')}",
	folders_save_success: "!{root.lang.__('folders_save_success')}",
	form_contain_errors: "!{root.lang.__('form_contain_errors')}",
	page_save_success: "!{root.lang.__('page_save_success')}",
	mode_folders: "!{root.lang.__('mode_folders')}",
	mode_pages: "!{root.lang.__('mode_pages')}",
	control_panel: "!{root.lang.__('control_panel')}",
	lock_remove_error: "!{root.lang.__('lock_remove_error')}",
	lock_removed: "!{root.lang.__('lock_removed')}"
};
var locales = !{root.locales};
var current_username = "!{root.auth.username}";
var layouts = !{root.layouts};
var folders_preload = !{root.folders};
for (var i = 0; i < locales.length; i++) {
	$('#olang').append('<option value="' + locales[i] + '">' + locales[i] + '</option>');
	$('#plang').append('<option value="' + locales[i] + '">' + locales[i] + '</option>');
	$('#taracot_folders_edit_form').append('<div class="uk-form-row"><div class="uk-form-controls"><label class="uk-form-label" for="flang_' + locales[i] + '">!{root.lang.__("ftitle")} (' + locales[i] + ')</label><input type="text" id="flang_' + locales[i] + '" class="uk-form-width-large taracot-folders-edit-control"></div></div>');
}
for (var i = 0; i < layouts.avail.length; i++) {
	$('#playout').append('<option value="' + layouts.avail[i] + '">' + layouts.avail[i] + '</option>');
}
</script>
<script src="/js/ckeditor/ckeditor.js"></script>
<script src="/js/ckeditor/adapters/jquery.js"></script>
<script src="/js/jstree/jstree.min.js"></script>
<!--
<script src="/js/jstorage.js"></script>
<script src="/js/moment.min.js"></script>
<script src="/js/jquery.medved.loading.js"></script>
<script src="/modules/pages/js/tree.js"></script>
<script src="/modules/pages/js/main.js"></script>
-->
<script src="/modules/pages/js/pages.min.js"></script>